<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2018/6/10
  Time: 19:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>欢迎来到最高权限管理员界面</title>
    <link rel="stylesheet" type="text/css" href="/static/css/admin_main.css">
    <link rel="stylesheet" type="text/css" href="/static/css/admin_main_con.css">
    <script type="text/javascript" rel="script" src="/static/js/jq.js"></script>
    <script type="text/javascript" rel="script" src="/static/js/admin_main.js"></script>
</head>
<body>
<div class="navigator">
    <div class="title">
        <p>Manage</p>
    </div>
    <div class="admin_manage">
        <p>最高权限管理员</p>
    </div>
    <div class="view_copy">
        <p>版本信息</p>
    </div>
</div>
<div class="main_con">
    <div class="header">
        <p>ChenforCode图书馆管理系统</p>
        <a href="/login/doLogout">退出登陆</a>
    </div>
    <div class="content">
        <div class="info">
            <h3>学生管理员</h3>
            <a class="create1">创建</a>
            <span>${sessionScope.add1_msg}</span>
            <table class="gridtable">
                <tr>
                    <td>管理员名称</td>
                    <td>管理员密码</td>
                    <td>管理员联系方式</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${stuAdmins}" var="p">
                    <tr>
                        <td>${p.saname}</td>
                        <td>${p.sapwd}</td>
                        <td>${p.satel}</td>
                        <td>
                            <a href="/admin/upStuAdminPrompt?id=${p.saname}">修改</a>
                            <a href="/admin/delStuAdmin?id=${p.saname}" onclick='return confirm("是否确认删除？")'>删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <div class="add_ad1" style="display: none">
                <form action="/admin/addStuAdmin" class="add_ad1_form">
                    <div>
                        管理员名称:<input type="text" class="name1" name="saname">
                    </div>
                    <div>
                        密码:<input type="text" class="pwd1" name="sapwd">
                    </div>
                    <div>
                        联系方式:<input type="text" class="tel1" name="satel">
                    </div>
                    <input type="button" class="ad_bt1" value="增加学生管理员">
                </form>
            </div>

            <h3>书籍管理员</h3>
            <span class="create2">创建</span>
            <span>${sessionScope.add2_msg}</span>
            <table class="gridtable">
                <tr>
                    <td>管理员名称</td>
                    <td>管理员密码</td>
                    <td>管理员联系方式</td>
                    <td>操作类型</td>
                </tr>
                <c:forEach items="${bookAdmins}" var="p">
                    <tr>
                        <td>${p.baname}</td>
                        <td>${p.bapwd}</td>
                        <td>${p.batel}</td>
                        <td>
                            <a class="btn" href="/admin/upBookAdminPrompt?id=${p.baname}">修改</a>
                            <a class="btn" href="/admin/delBookAdmin?id=${p.baname}" onclick='return confirm("是否确认删除？")'>删除</a>
                        </td>
                    </tr>
                </c:forEach>
            </table>

            <div class="add_ad2" style="display: none">
                <form action="/admin/addBookAdmin" class="add_ad2_form">
                    <div>
                        管理员名称:<input type="text" class="name2" name="baname">
                    </div>
                    <div>
                        密码:<input type="text" class="pwd2" name="bapwd">
                    </div>
                    <div>
                        联系方式:<input type="text" class="tel2" name="batel">
                    </div>
                    <input type="button" class="ad_bt2" value="增加书籍管理员">
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
